<include file="Index:header" />

<body>
  <include file="Index:nav" />
  <article class="article-small">
    <section class="page-section">
     
      <div contenteditable="false" spellcheck="false" class="segment no-padding">
        <include file="Index:breadcrumb" />
        <article class="article">
          <header>
            <h1 class="text-center">{$content['title']}</h1>
            <dl class="dl-inline">
              <dt>分类：</dt>
              <dd>{$categoryName}</dd>
              <dt>发布时间：</dt>
              <dd>{$content.time|date="Y-m-d",###}</dd>
              <dt>来源：</dt>
              <dd>{$content.author|default="未知"}</dd>
              <dt></dt>
              <dd class="pull-right">
                  <if condition="time() lt ($content.time + 60*60*24)"><span class="label label-success">NEW</span>
                      <else/>
                      <span class="label label-success">积累</span>
                  </if>
                  
                  <if condition="($content.author eq '撒哈拉的小猫') or ($content.author eq 'chenyeyu2') or ($content.author eq 'chenyeyu')or ($content.author eq 'chenyeyuze')">
                      <span class="label label-info">原创</span>
                  <else/></if>
            </dl>
            <section class="article-content">
                {$content['content']}
            </section>
          <footer>
            <p class="pull-right text-muted">
              本文链接：http://{:I('server.SERVER_NAME')}{:U('Home/Index/Content','id='.$content['id'])}
            </p>
            <p class="text-important">本文版权所有归<a href="{:U('/')}"><php>echo getSiteOption('siteName');</php></a></p>
            <ul class="pager pager-justify">
              <li class="previous"><a href="{:U('content','id='.$prev['id'])}"><i class="icon-arrow-left"></i> {$prev.title}</a></li>
              <li><a href="<php>echo getCategoryUrl($categoryId);</php>"><i class="icon-list-ul"></i> 目录</a></li>
              <li class="next"><a href="{:U('content','id='.$next['id'])}"> <i class="icon-arrow-right"></i> {$next.title}</a></li>
            </ul>
          </footer>
        </article>
      </div>
      
       
      </div>
      <include file="Index:footer" />
    </section>
  </article>
</body>
<script type="text/javascript" src="__PUBLIC__/ueditor/third-party/SyntaxHighlighter/shCore.js"></script>
<script type="text/javascript">
    SyntaxHighlighter.all();
     $(function(){
         function postAjaxComment(flag,id){
             $.post("{:U('/Home/Index/comment_gb')}", { "commentid": id ,"flag": flag },
				   function(data){
                                        if(isNaN(data)){
                                            alert("{:C('COMMENT_DATE')}");
                                        }else{
                                            $("." + flag + id).text(data);
                                        }
					
				 }, "text");
         }
         
         $(".zantongClick").click(function(){
             var commentid = $(this).attr("commentid");
             postAjaxComment('zantong',commentid);
          });
        $(".diandeClick").click(function(){
             var commentid = $(this).attr("commentid");
             postAjaxComment('diande',commentid);
           
        });

    })
</script>
<include file="Index:footerJs" />